001 /*
002 * Copyright 2004-2005 Mort Bay Consulting Pty. Ltd.
003 * Copyright 2006 Stephen McConnell.
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018 package net.dpml.test.http;
019
020 import javax.servlet.ServletContextAttributeEvent;
021 import javax.servlet.ServletContextAttributeListener;
022 import javax.servlet.ServletContextEvent;
023 import javax.servlet.ServletContextListener;
024 import javax.servlet.ServletRequestAttributeEvent;
025 import javax.servlet.ServletRequestAttributeListener;
026 import javax.servlet.ServletRequestEvent;
027 import javax.servlet.ServletRequestListener;
028 import javax.servlet.http.HttpSessionActivationListener;
029 import javax.servlet.http.HttpSessionAttributeListener;
030 import javax.servlet.http.HttpSessionBindingEvent;
031 import javax.servlet.http.HttpSessionEvent;
032 import javax.servlet.http.HttpSessionListener;
033
034 /**
035 * Test listeners.
036 */
037 public class TestListener implements HttpSessionListener, HttpSessionAttributeListener, HttpSessionActivationListener, ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener
038 {
039 /**
040 * Attribute added.
041 * @param se binding event
042 */
043 public void attributeAdded( HttpSessionBindingEvent se )
044 {
045 // System.err.println("attributedAdded "+se);
046 }
047
048 /**
049 * Attribute removed.
050 * @param se binding event
051 */
052 public void attributeRemoved( HttpSessionBindingEvent se )
053 {
054 // System.err.println("attributeRemoved "+se);
055 }
056
057 /**
058 * Attribute replaced.
059 * @param se binding event
060 */
061 public void attributeReplaced( HttpSessionBindingEvent se )
062 {
063 // System.err.println("attributeReplaced "+se);
064 }
065
066 /**
067 * Session passivate notification
068 * @param se session event
069 */
070 public void sessionWillPassivate( HttpSessionEvent se )
071 {
072 // System.err.println("sessionWillPassivate "+se);
073 }
074
075 /**
076 * Session did activate notification
077 * @param se session event
078 */
079 public void sessionDidActivate( HttpSessionEvent se )
080 {
081 // System.err.println("sessionDidActivate "+se);
082 }
083
084 /**
085 * Context initiated notification
086 * @param sce servlet context event
087 */
088 public void contextInitialized( ServletContextEvent sce )
089 {
090 // System.err.println("contextInitialized "+sce);
091 }
092
093 /**
094 * Context destroy notification
095 * @param sce servlet context event
096 */
097 public void contextDestroyed( ServletContextEvent sce )
098 {
099 // System.err.println("contextDestroyed "+sce);
100 }
101
102 /**
103 * Attribute added notification
104 * @param scab servlet context attribute event
105 */
106 public void attributeAdded( ServletContextAttributeEvent scab )
107 {
108 // System.err.println("attributeAdded "+scab);
109 }
110
111 /**
112 * Attribute removed notification
113 * @param scab servlet context attribute event
114 */
115 public void attributeRemoved( ServletContextAttributeEvent scab )
116 {
117 // System.err.println("attributeRemoved "+scab);
118 }
119
120 /**
121 * Attribute replaced notification
122 * @param scab servlet context attribute event
123 */
124 public void attributeReplaced( ServletContextAttributeEvent scab )
125 {
126 // System.err.println("attributeReplaced "+scab);
127 }
128
129 /**
130 * Request destroyed notification
131 * @param sre servlet request event
132 */
133 public void requestDestroyed( ServletRequestEvent sre )
134 {
135 // System.err.println("requestDestroyed "+sre);
136 }
137
138 /**
139 * Request initialized notification
140 * @param sre servlet request event
141 */
142 public void requestInitialized( ServletRequestEvent sre )
143 {
144 // System.err.println("requestInitialized "+sre);
145 }
146
147 /**
148 * Attribute added notification
149 * @param srae servlet request attribute event
150 */
151 public void attributeAdded( ServletRequestAttributeEvent srae )
152 {
153 // System.err.println("attributeAdded "+srae);
154 }
155
156 /**
157 * Attribute removed notification
158 * @param srae servlet request attribute event
159 */
160 public void attributeRemoved( ServletRequestAttributeEvent srae )
161 {
162 // System.err.println("attributeRemoved "+srae);
163 }
164
165 /**
166 * Attribute replaced notification
167 * @param srae servlet request attribute event
168 */
169 public void attributeReplaced( ServletRequestAttributeEvent srae )
170 {
171 // System.err.println("attributeReplaced "+srae);
172 }
173
174 /**
175 * Session created notification
176 * @param se session event
177 */
178 public void sessionCreated( HttpSessionEvent se )
179 {
180 // System.err.println("sessionCreated "+se);
181 }
182
183 /**
184 * Session destroyed notification
185 * @param se session event
186 */
187 public void sessionDestroyed( HttpSessionEvent se )
188 {
189 // System.err.println("sessionDestroyed "+se);
190 }
191
192 }